import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '身份证',
    align:"center",
    dataIndex: 'idnumber'
   },
   {
    title: '健康管家',
    align:"center",
    dataIndex: 'heathMag'
   },
   {
    title: '服务机构',
    align:"center",
    dataIndex: 'serviceOrg'
   },
   {
    title: '技术指导机构',
    align:"center",
    dataIndex: 'techOrg'
   },
   {
    title: '订单指导员',
    align:"center",
    dataIndex: 'orderGuide'
   },
   {
    title: '责任医生',
    align:"center",
    dataIndex: 'primaryDoc'
   },
   {
    title: '责任护士',
    align:"center",
    dataIndex: 'primaryNurse'
   },
   {
    title: '责任护工',
    align:"center",
    dataIndex: 'primaryCare'
   },
   {
    title: '管理延续',
    align:"center",
    dataIndex: 'manaExtra'
   },
   {
    title: '信息延续',
    align:"center",
    dataIndex: 'inforExtra'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '身份证',
    field: 'idnumber',
    component: 'Input',
  },
  {
    label: '健康管家',
    field: 'heathMag',
    component: 'Input',
  },
  {
    label: '服务机构',
    field: 'serviceOrg',
    component: 'Input',
  },
  {
    label: '技术指导机构',
    field: 'techOrg',
    component: 'Input',
  },
  {
    label: '订单指导员',
    field: 'orderGuide',
    component: 'Input',
  },
  {
    label: '责任医生',
    field: 'primaryDoc',
    component: 'Input',
  },
  {
    label: '责任护士',
    field: 'primaryNurse',
    component: 'Input',
  },
  {
    label: '责任护工',
    field: 'primaryCare',
    component: 'Input',
  },
  {
    label: '管理延续',
    field: 'manaExtra',
    component: 'Input',
  },
  {
    label: '信息延续',
    field: 'inforExtra',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];

// 高级查询数据
export const superQuerySchema = {
  idnumber: {title: '身份证',order: 0,view: 'text', type: 'string',},
  heathMag: {title: '健康管家',order: 1,view: 'text', type: 'string',},
  serviceOrg: {title: '服务机构',order: 2,view: 'text', type: 'string',},
  techOrg: {title: '技术指导机构',order: 3,view: 'text', type: 'string',},
  orderGuide: {title: '订单指导员',order: 4,view: 'text', type: 'string',},
  primaryDoc: {title: '责任医生',order: 5,view: 'text', type: 'string',},
  primaryNurse: {title: '责任护士',order: 6,view: 'text', type: 'string',},
  primaryCare: {title: '责任护工',order: 7,view: 'text', type: 'string',},
  manaExtra: {title: '管理延续',order: 8,view: 'text', type: 'string',},
  inforExtra: {title: '信息延续',order: 9,view: 'text', type: 'string',},
};

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}